<?php include ('template/header.php'); ?>

<script>
    function validarNum(e)
    {
        tecla = (document.all) ? e.keyCode : e.which;
        if (tecla == 8) return true;
        patron = /[0-9\,\.]/;
        te = String.fromCharCode(tecla);
        return patron.test(te);
    }
</script>
<div id="content">
    <div id="breadcrumb">Inicio &raquo; Agregar Asesor</div>
    <div id="titulo">Agregar Asesor</div>
    <div class="wrapper600 f14">
        <form name="forma1" method="POST" action="agregar_asesor2.php" onsubmit="return validateForm()" enctype="multipart/form-data">
            <div class="field2">
                <div class="label2">Nombre(s):</div>
                <div class="desc2">
                    <input type="text"  name="nombre" class="campo" onKeyPress="if (event.keyCode > 45 && event.keyCode < 58) event.returnValue = false">
                </div>
            </div>
            <div class="field2">
                <div class="label2">Apellido(s):</div>
                <div class="desc2">
                    <input type="text"   name="apellido"  class="campo" onKeyPress="if (event.keyCode > 45 && event.keyCode < 58) event.returnValue = false">
                </div>
            </div>
            <div class="field2">
                <div class="label2">Email:</div>
                <div class="desc2">
                    <input type="text"  maxlength="30" name="email"  class="campo" >
                </div>
            </div>
            <div class="field2">
                <div class="label2">Extension:</div>
                <div class="desc2">
                    <input type="text" name="extension" class="campo" onKeyPress="return validarNum(event)" >
                </div>
            </div>
            <div class="field2">
                <div class="label2">Area de especialidad:</div>
                <div class="desc2">
                  <select type="text" name="especialidad" class="campo" >
                    <option value="Redes">Redes</option>
                    <option value="Desarrollo de software">Desarrollo de software</option>
                    <option value="Calidad del software">Calidad del software</option>
                    <option value="Desarrollo de aplicaciones web">Desarrollo de aplicaciones web</option>
                    <option value="Dispositivos mobiles">Dispositivos Mobiles</option>
                  </select>
                </div>
            </div>
          <br>
            <div class="field2">
                <div class="label2">Usuario:</div>
                <div class="desc2">
                    <input type="text" name="usua" class="campo" >
                </div>
            </div>
            <div class="field2">
                <div class="label2">Password:</div>
                <div class="desc2">
                    <input id="pass" type="password" name="password"  class="campo" >
                </div>
            </div>
          <div class="field2">
                <div class="label2">Confirmar Password:</div>
                <div class="desc2">
                    <input id="pass2" type="password" name="password2"  class="campo" >
                </div>
            </div>
            <div class="clear"></div>
            <div class="sexto">
                <div>Dia</div>
                <div>H. Entrada</div>
                <div>H. Salida</div>
            </div>
            <div class="sexto center">
                <div>Lunes</div>
                <div><?php echo getHoras('helun'); ?></div>
                <div><?php echo getHoras('hslun'); ?></div>
            </div>
            <div class="sexto center">
                <div>Martes</div>
                <div><?php echo getHoras('hemar'); ?></div>
                <div><?php echo getHoras('hsmar'); ?></div>
            </div>
            <div class="sexto center">
                <div>Miercoles</div>
                <div><?php echo getHoras('hemie'); ?></div>
                <div><?php echo getHoras('hsmie'); ?></div>
            </div>
            <div class="sexto center">
                <div>Jueves</div>
                <div><?php echo getHoras('hejue'); ?></div>
                <div><?php echo getHoras('hsjue'); ?></div>
            </div>
            <div class="sexto center">
                <div>Viernes</div>
                <div><?php echo getHoras('hevie'); ?></div>
                <div><?php echo getHoras('hslvie'); ?></div>
            </div>
            <div class="clear"></div>
            <input type="submit" value="Guardar" name="B1" class="boton">
            <input type="reset" value="Limpiar" name="B2" class="boton">
        </form>
    </div>
</div>
<script>
function validateForm() {
    var pass = document.getElementById('pass').value;
    var pass2 = document.getElementById('pass2').value;
    if (pass != pass2 ) {
        alert("Los valores de password deben de ser identicos");
        return false;
    }
    return true;
}
</script>